﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CH02_03
{
    class CH02_03
    {
        static void Main(string[] args)
        {
            // 定义不同类型的矩形的长和宽;
            int iRecLength = 10, iRecWidth = 20;
            double dblRecLength = 10.1, dblRecWidth = 20.2;
            float fRecLength = 10.11F, fRecWidth = 20.22F;

            int iRecArea, iRecCircumference;
            double dblRecArea, dblRecCircumference;
            float fRecArea, fRecCircumference;

            // 计算不同矩形的面积和周长;
            iRecArea = iRecLength * iRecWidth;
            iRecCircumference = 2 * (iRecLength + iRecWidth);

            Console.WriteLine("圆1的长为:{0},圆1的宽为:{1}", iRecLength, iRecWidth);
            Console.WriteLine("圆1的面积为:{0},圆1的周长为:{1}", iRecArea, iRecCircumference);
            Console.Write("\n");

            dblRecArea = dblRecLength * dblRecWidth;
            dblRecCircumference = 2 * (dblRecLength + dblRecWidth);

            Console.WriteLine("圆2的长为:{0},圆2的宽为:{1}", dblRecLength, dblRecWidth);
            Console.WriteLine("圆2的面积为:{0},圆2的周长为:{1}", dblRecArea, dblRecCircumference);
            Console.Write("\n");

            fRecArea = fRecLength * fRecWidth;
            fRecCircumference = 2 * (fRecLength + fRecWidth);

            Console.WriteLine("圆3的长为:{0},圆3的宽为:{1}", fRecLength, fRecWidth);
            Console.WriteLine("圆3的面积为:{0},圆3的周长为:{1}", fRecArea, fRecCircumference);
            Console.Write("\n");
        }
    }
}
